//
//  ChatElements.h
//  SolarSeek
//
//  Created by Erick Fejta on 05/05/25.
//  Copyright 2005 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

#import "SourceListElement.h"
#import "Chats.h"

@interface ChatElement : SourceListElement {
	NSArray *_conversations;
	NSMutableAttributedString *_text;
	NSCalendarDate *_last;
	NSDate *_lastMe;
	BOOL _alt;
	BOOL joined;
}
- (id)initWithView:(NSView *)view chat:(Chat *)chat icon:(NSImage *)icon;

- (NSAttributedString *)text;
- (NSArray *)conversations;
- (NSArray *)participants;

- (Chat *)chat;

- (void)update;

@end

@interface ChatsElement : SourceListElement {
	BOOL expandable;
	NSMutableArray *children;
}

- (id)initWithView:(NSView *)view expandable:(BOOL)expand;

- (void)selectChat:(Chat *)chat;

+ (ChatElement *)elementForChat:(Chat *)chat;
+ (ChatsElement *)elementChatsRoot;
+ (void)scheduleSelectChat:(Chat *)chat;

@end
